Welcome

Welcome to Hossware Code Present Hoss

Code Present Hoss is the premier code formatting, printing, and presenting tool for Visual Basic. If you have regular code reviews, or if you use hard copy documentation of your source code, then Code Present Hoss is the tool for you.

What you'll find in the documentation

Quick Tour - A quick look at the features of Code Present Hoss.

Reference - Detailed information on features, menus, and dialogs.

Support - Support options for Code Present Hoss.

Technical - Requirements and other technical info you may find useful.

Software and Documentation © 1998-1999 Hossware, Inc. All rights reserved.


Quick Tour

Code Present Hoss is a powerful tool that can help you format your code for readability and for presentations (such as code reviews).

Formatting

It's a well known fact that poor formatting, or even slightly different formatting, can seriously affect the readability of code. If you have a lot of code that uses different styles of formatting, especially if it's assembled from varied sources, you can see the benefit of a standard format. Code Present Hoss can help.

It can turn your code from:

Public Sub MyCode()

  ' This code does some wonderful things

  Dim x$, Y#, M

  x$ = "Hello World" : y# = 1.5
    I f x$ = "Hello World" Then DoSomething y#

  Select Case GetValue(Y#)
   Case 1.5
    Call TestValue
    Case 3.2
    Call TestAnotherValue
    End Select

End Sub

To This:

   Public
    Sub MyCode()

' This code does some wonderful things

Dim x As String
Dim y As Double
Dim M

x = "Hello World"
y = 1.5

If x = "Hello World" Then
DoSomething Y
End If

  Select Case GetValue(Y)
  Case 1.5
    Call TestValue
  Case 3.2
    Call TestAnotherValue
  End Select

End Sub

Now, of course, we don't all write code this poorly formatted. But how many times have you had to maintain code that others have written, with differing levels of formatting quality? Or have you ever downloaded a large code sample from the Internet and wanted to format it for your particular tastes and standards? It was a chore, if you had to do it by hand. Well, you no longer have to.

Printing

Not much can improve the quality of your code more than peer review. Code Present Hoss will print your code so nicely, it will stun your peers. Don't use the standard, and rudimentary, printing capability of Visual Basic for these meetings. Print your code with style. Using the above example:

Code Present Hoss provides a number of options to get your printing done right. And since it uses Microsoft's Rich Text Format (RTF) standard to print, you know it will be the highest quality and it will be compatible with your software and hardware.


Support

You can get support for Code Present Hoss using the following resources:

Simply e-mail questions or comments to our support staff.

support@hossware.com

Search the Hossware knowledge base for articles on Code Present Hoss.

http://www.hossware.com/support_kb.html

Join in discussions with other Code Present Hoss users. Ask questions or answer other's questions. Our support staff monitors the forums, so it's a good place to put a question.

http://www.hossware.com/support_forums.html

Other support options may become available after this documentation has been written. Visit our website for all the latest details.

http://www.hossware.com/support.html

For additional support information and the latest Code Present Hoss news please visit our website.

http:///www.hossware.com


Technical

Hossware Code Present Hoss has the following requirements:

  • Windows 95, 98, NT 4.0, 2000, or later.

  • 16 MB RAM

  • 25 MB Disk Space

  • Microsoft Internet Explorer 3.2 or higher (for viewing this help file)

  • Microsoft Word 97, Word 2000, or WordViewer 97 (for printing and previewing). If you don't have any of these, WordViewer 97 is a free program can be downloaded from Microsoft at no charge.

Hossware Code Present Hoss is written entirely in Visual Basic 6.0. RTF Generation is provided by Hossware OutputHoss 1.0.


Reference

Select from the items below for more information.

General

Main Form - A tour of the main form.

Menus

Project - Work with the current project.

Files - Add/Remove files from the current project.

Run - Format or print your code.

Options - Set up the formatting or printing.

Help - Accessing Help.

Dialogs

Printing - Printing options.

Formatting - Formatting options.


Project Menu

The project menu has items to help you work with the current project file, and to open a different one.

New

Creates a new, empty project. If you have a project already opened with changes that have not been saved, you will prompted to save it first.

Open

Presents the windows File Open dialog to allow you to select a project file to open. If you have a project already opened with changes that have not been saved, you will prompted to save it first.

Close

Closes the current project. If there is no project open, this item will be disabled.

Save

Saves the current project. If the project doesn't have any unsaved changes, this item will be disabled.

Save As

Saves the current project with a different name.

Most Recently Used

Here you will see the 9 most recently opened project files. Code Present Hoss will keep track of the last 100 files you opened. If your Most Recently Used list has more than 9 items, you will see the first nine in the menu and there will be a 10th option called "Other Files..." that will open a dialog box listing all 100 recent files.

Exit

Closes Code Present Hoss. If you have a project opened with changes that have not been saved, you will prompted to save it first.


Files Menu

Contains items to allow you to add and remove files from the current project.

Add

Presents you with a File Open dialog so you can select a code file to add to the project. If you don't have a project open, this item will be disabled.

Remove

Removes the current file selected in the tree. If no file is selected, this item will be disabled.

Clear

Clears all files from the project. If there are no files in the project, this item will be diabled.


Run Menu

Use these items to do all the work of Code Present Hoss

Print

Prints all files in the project. If no project is opened, this item will be disabled. The printing process will follow this procedure:

  • Formats the files (if formatting is selected in the Printing Dialog).

  • Creates a RTF file of the output. This file will be in the same folder as the project file, and will have the same name except for the .rtf extension.

  • Open the RTF file in Word or WordViewer, depending on what you have installed.

  • Print the document on the current printer. The file will be left open in Word or WordViewer

You will get a status report as the RTF file is generated that you can cancel any time. Once printing has started, you can cancel it in Word or WordViewer at any time.

Preview

Does the same thing as the Print item above, except that it doesn't automatically print the document to the printer. Once the document is open in Word or WordViewer, you can print it from there without having to reformat or recreate the RTF file.

Format

Applies your formatting options to the files in the project. If you have turned on the Backup (in the Formatting Dialog), all files will be backed up first. If there are already backup files that would be erased if you continuted formatting, you will be notified which files would be erased and asked if you wish to continue.


Options Menu

Lets you set the Printing and Formatting options as well as preview the formatting.

Printing

Opens the Printing Dialog that you can use to set printing options.

Formatting

Opens the Formatting Dialog that you can use to set formatting options.

Preview Formatting

Applys your formatting options to the code shown in the main window. The formatting is not applied to the file by selecting this option. This item is a toggle, meaning that it stays selected until you unselect it. When selected, all files shown in the main window will have formatting applied. If you change the current file by selecting a different one in the tree, you will see it with formatting applied. Also, when it's selected, if you change some options in the Formatting Dialog, they will be shown automatically in main window.


Help Menu

Lets you access this help file and get info about Code Present Hoss.

Contents

Opens up the contents of this help file.

Index

Opens up the index of this help file.

About

Opens the About Dialog which you can use to get the version number of Code Present Hoss.


Printing Dialog

Use this dialog to set the your printing options. Select an option below for more information on that tab.

General - General print settings.

Paper - Paper and margin size.

Fonts - Fonts to use for different section sof the document.


General Tab (Printing)

Keep Procedures Together

Attempts to keep a procedure from being split by a page break. If a page break would split a procedure, the entire thing is moved to the next page. Of course, if a procedure is too large for a page, it will have to be split.

Format Before Printing

Applys whatever formatting options you've selected in the Formatting Dialog before the files are printed. The formatting will not change your source files, only the printed output will be affected.

Line Spacing

Select the spacing you want to apply to the printed output. Options are 1, 1.5, 2, 3, 4, & 5.

Line Numbering

None - No line numbering.

Page - Restart each page.

Module - Restart for each module.

All - Don't restart numbering

Procedure Separator

None - Don't separate procedures from each other.

Line - Draw a horizontal line between each procedure.

Page - Put each procedure on its own page.


Paper Tab (Printing)

Height, Width

Height and Width of the paper, in inches.

Margins - Top, Left, Right, Bottom

Size of the margins, in inches.


Fonts Tab (Printing)

Comments

Formatting applied to all comments in the code.

Footers

Formatting applied to the footers (date/time and page numbers).

Headers Bottom

Formatting applied to the bottom line of the header (module file name).

Headers Top

Formatting applied to the top line of the header (module name and current procedure).

Literals

Formatting applied to literals (strings, numbers, and dates).

Procedure

Formatting applied to the name and time of the procedure (precedes each procedure).

Name

The name of the font face to use.

Size

Size of the font, in points.

Color

Color of the text.

Back Color

Color of the background, behind the text.

Underline

Style of underline, if any, to use.

Bold, Italic, Strikethrough, Small Caps, All Caps, Shadow, Outline, Emboss, Engrave

Select any combination of these styles to be applied to the font.


Formatting Dialog

Use this dialog to set the formatting options. Select an option below for more information on that tab.

Comments - Comment formatting.

Indentation - Line indentation.

Lines & Spacing - Blank lines and line continuations.

Other - Other formatting options.

Backup - File backup options.


Comments Tab (Formatting)

In Line (comments at the end of a line of code)

Ignore - Leave as they are.

Delete - Remove in line comments.

Start at same position - Move in line comments to be indented the selected number of spaces. The next three options dictate behavior if the space is not available.

Move to next line - Move the comment to then next line.

Move to prior line - Move the comment to the prior line.

Place at end of line - Place after the code on the line, with a buffer of one space.

Single Line (comments on their own line)

Ignore - Leave as they are.

Delete - Remove sinle line comments.

Align with following line - Align with the first non-empty line that follows them.

Align with prior line - Align with the first non-empty line that precedes them.

Start as same position - Move the comments to be indented the selected number of spaces.


Indentation Tab (Formatting)

Auto Indent

Indent code within control scructures the number of spaces entered. Control structures are: Sub, Function, Property, If, #If, Select Case, Do, While, For, Enum, & Type.

Special Select ... Case structure

Align Case with Select - Align the Case statement with the Select Case statement.

Indent Case - Indent Case statment regular indentation.

Indent Case 1/2 - Indent Case statement one half of regular indentation.

Special If ... Else structure

Align Else with If - Align the Else statement with the If statement.

Indent Else - Indent Else statment regular indentation.

Indent Else 1/2 - Indent Else statement one half of regular indentation.

These options also apply to #If ... #Else structures.

Exceptions

Items checked will not be indented at all, but will be aligned to the left.


Lines and Spacing Tab (Formatting)

Lines & Spacing Tab (Formatting)

Line Continuation

Ignore - Leave existing line continuations.

Combine - Remove existing line continuations, make one line out of them.

Add if longer than - Ensure that all lines are no longer than the size entered. Will not be applied to lines that already have line continuations that are ignored.

Limit blank lines

Limits the number of blank lines in all code.

Insert Blank Line

Check any combination of items to insert a blank line before or after any of the types of lines listed. If a blank line is already in the selected position, no line will be inserted.


Other Tab (Formatting)

Remove and Replace Type Declaration Characters

Removes any type declaration characters. If the character is in a Dim or Const statement, then it will be replaced with its corresponding 'As' statement. 'As String' for '$', for example.

Specify Public and Private in Module declarations

If a variable or constant is declared in the declarations section of a module as Global, it will be changed to Public. Likewise, if it doesn't have a scope modifier, it will be changed to Private.

Remove Variable Names from Next statements

All variable names after the Next statement will be removed.

Split multiple Dim statements

Ensures that each Dim statement will be on its own line.

Split multiple Const statement

Ensures that each Const statement will be on its own line.

Split multiple statements

Places each statement on its own line, if there is more than one statement on a line separated by a colon.

Split Simple If

Makes multiple line If statements out of single lines.

Split Labels from Code

Ensures that each Label will be on its own line, and not have code following it.

Remove line numbers

Removes any line numbers.

Add Option Explicit

Adds the 'Option Explicit' statement to a module, if it doesn't have it.


Backup Tab (Formatting)

Back up files before modification

Makes a backup copy of all files before they have formatting applied to them. Backup files will be named using a combination of the following two items.

Backup file suffix

The text entered here will be added to the end of the file name to make the backup file name. Example: Module.bas would be changed to Modulebak.bas (using the above settings).

Backup file prefix

The text entered here will be added to the beginning of the file name to make the backup file name. Example: Module.bas would be changed to Backup_Module.bas (if you entered 'Backup_' in the prefix, and left the suffix blank).


Main Form

On the main form you can see all files that have been added to a project in the tree on the left.

The text on the right is the code that is in the file selected in the tree. You can preview your formatting settings here by selecting Preview Formatting... from the Options menu.

If you add a Visual Basic project or Project Group to the Code Present Hoss project, you'll see that file added as a top level item in the tree, and all of its files are added as sub items.